function name_hint(inputString) {
	if(inputString.length == 0) {
		// Hide the suggestion box.
		$('#name_suggest').hide();
	} else {
		$.post("gethint_name.php", {queryString: ""+inputString+""}, function(data){
			if(data.length >0) {
				$('#name_suggest').show();
				$('#name_autoSuggestionsList').html(data);
			}
		});
	}
} // lookup

function name_fill(thisValue) {
	$('#name').val(thisValue);
	setTimeout("$('#name_suggest').hide();", 200);
}

function sector_hint(inputString) {
	if(inputString.length == 0) {
		// Hide the suggestion box.
		$('#sector_suggest').hide();
	} else {
		$.post("gethint_sector.php", {queryString: ""+inputString+""}, function(data){
			if(data.length >0) {
				$('#sector_suggest').show();
				$('#sector_autoSuggestionsList').html(data);
			}
		});
	}
} // lookup

function sector_fill(thisValue) {
	$('#sector').val(thisValue);
	setTimeout("$('#sector_suggest').hide();", 200);
}

function subsector_hint(inputString) {
	if(inputString.length == 0) {
		// Hide the suggestion box.
		$('#subsector_suggest').hide();
	} else {
		$.post("gethint_subsector.php", {queryString: ""+inputString+""}, function(data){
			if(data.length >0) {
				$('#subsector_suggest').show();
				$('#subsector_autoSuggestionsList').html(data);
			}
		});
	}
} // lookup

function subsector_fill(thisValue) {
	$('#subsector').val(thisValue);
	setTimeout("$('#subsector_suggest').hide();", 200);
}

function type_hint(inputString) {
	if(inputString.length == 0) {
		// Hide the suggestion box.
		$('#type_suggest').hide();
	} else {
		$.post("gethint_type.php", {queryString: ""+inputString+""}, function(data){
			if(data.length >0) {
				$('#type_suggest').show();
				$('#type_autoSuggestionsList').html(data);
			}
		});
	}
} // lookup

function type_fill(thisValue) {
	$('#type').val(thisValue);
	setTimeout("$('#type_suggest').hide();", 200);
}

function addr_hint(inputString) {
	if(inputString.length == 0) {
		// Hide the suggestion box.
		$('#addr_suggest').hide();
	} else {
		$.post("gethint_addr.php", {queryString: ""+inputString+""}, function(data){
			if(data.length >0) {
				$('#addr_suggest').show();
				$('#addr_autoSuggestionsList').html(data);
			}
		});
	}
} // lookup

function addr_fill(thisValue) {
	$('#address').val(thisValue);
	setTimeout("$('#addr_suggest').hide();", 200);
}

function city_hint(inputString) {
	if(inputString.length == 0) {
		// Hide the suggestion box.
		$('#city_suggest').hide();
	} else {
		$.post("gethint_city.php", {queryString: ""+inputString+""}, function(data){
			if(data.length >0) {
				$('#city_suggest').show();
				$('#city_autoSuggestionsList').html(data);
			}
		});
	}
} // lookup

function city_fill(thisValue) {
	$('#city').val(thisValue);
	setTimeout("$('#city_suggest').hide();", 200);
}

function zipcode_hint(inputString) {
	if(inputString.length == 0) {
		// Hide the suggestion box.
		$('#zipcode_suggest').hide();
	} else {
		$.post("gethint_zip.php", {queryString: ""+inputString+""}, function(data){
			if(data.length >0) {
				$('#zipcode_suggest').show();
				$('#zipcode_autoSuggestionsList').html(data);
			}
		});
	}
} // lookup

function zipcode_fill(thisValue) {
	$('#zipcode').val(thisValue);
	setTimeout("$('#zipcode_suggest').hide();", 200);
}